$OpenBSD: patch-gettext-runtime_intl_log_c,v 1.4 2013/01/21 22:08:52 naddy Exp $
--- gettext-runtime/intl/log.c.orig	Tue Dec  4 07:28:58 2012
+++ gettext-runtime/intl/log.c	Wed Jan 16 23:06:10 2013
@@ -66,6 +66,7 @@ _nl_log_untranslated_locked (const char *logfilename, 
 {
   FILE *logfile;
   const char *separator;
+  size_t len;
 
   /* Can we reuse the last opened logfile?  */
   if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
@@ -82,10 +83,11 @@ _nl_log_untranslated_locked (const char *logfilename, 
           last_logfilename = NULL;
         }
       /* Open the logfile.  */
-      last_logfilename = (char *) malloc (strlen (logfilename) + 1);
+      len = strlen (logfilename) + 1;
+      last_logfilename = (char *) malloc (len);
       if (last_logfilename == NULL)
         return;
-      strcpy (last_logfilename, logfilename);
+      strlcpy (last_logfilename, logfilename, len);
       last_logfile = fopen (logfilename, "a");
       if (last_logfile == NULL)
         return;
